#pragma once

#include <assert.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>

#define NAME_MAX 20
#define SEX_MAX 5
#define TELE_MAX 12
#define ADDR_MAX 30

#define MAX 100

#define DEFAULT_SZ 3
#define DEFAULT_INC 2


//?????????
typedef struct PeoInfo
{
	char name[NAME_MAX];
	int age;
	char sex[SEX_MAX];
	char tele[TELE_MAX];
	char addr[ADDR_MAX];
}PeoInfo;


//?????????
//typedef struct Contact
//{
//	PeoInfo data[MAX];//???????
//	int sz;//???????????????????????????
//}Contact;


//?????????
typedef struct Contact
{
	PeoInfo* data;//???????
	int sz;//???????????????????????????
	int capacity;//??????????????????
}Contact;




//????????
void InitContact(Contact* pc);

//?????????
void AddContact(Contact* pc);

//?????????????
void ShowContact(const Contact* pc);

//???????????
void DelContact(Contact* pc);

//????????????
void SearchContact(Contact* pc);

//???????????
void ModifyContact(Contact* pc);

//???????
void DestroyContact(Contact* pc);


//????????????
void SaveContact(Contact* pc);

//???????????????
void LoadContact(Contact* pc);









